#include <iostream>
#include <algorithm>

using namespace std;
void MyPrint(int val){
    cout<<val<<endl;
}
void test01(){
    vector<int>v;
    v.push_back(12);
    v.push_back(12);
    v.push_back(12);
    v.push_back(12);
    vector<int>::iterator pBegin=v.begin();
    vector<int>::iterator pEnd=v.end();
    while(pBegin!=pEnd){
        cout<<*pBegin<<endl;
        pBegin++;
    }
    for(vector<int>::iterator it=v.begin();it!=v.end();it++){
       cout<<*it<<endl;
    }
    cout<<endl;
    for_each(v.begin(),v.end(), MyPrint) ;
}

int main() {
test01();
    return 0;
}
